package cn.edu.lingnan.part.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class PersonController {

    @Value("${person.name}")
    private String name;
    @Value("${person.age}")
    private int age;
    @Value("${person.sex}")
    private String sex;

    @RequestMapping("/hello01")
    @ResponseBody
    public String hello(){
        return "姓名：" + name + "年龄：" + age + "性别：" + sex;
    }

}
